class RoomClassifyEntity {
	int id;
	String name;
	int parent;
	int sort;
	int type;
	String createdAt;
	String updatedAt;
	List<Children> children;

	RoomClassifyEntity(
			{this.id,
				this.name,
				this.parent,
				this.sort,
				this.type,
				this.createdAt,
				this.updatedAt,
				this.children});

	RoomClassifyEntity.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		name = json['name'];
		parent = json['parent'];
		sort = json['sort'];
		type = json['type'];
		createdAt = json['created_at'];
		updatedAt = json['updated_at'];
		if (json['children'] != null) {
			children = new List<Children>();
			json['children'].forEach((v) {
				children.add(new Children.fromJson(v));
			});
		}
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['name'] = this.name;
		data['parent'] = this.parent;
		data['sort'] = this.sort;
		data['type'] = this.type;
		data['created_at'] = this.createdAt;
		data['updated_at'] = this.updatedAt;
		if (this.children != null) {
			data['children'] = this.children.map((v) => v.toJson()).toList();
		}
		return data;
	}
}

class Children {
	int id;
	String name;
	int parent;
	int sort;
	int type;
	String createdAt;
	String updatedAt;

	Children(
			{this.id,
				this.name,
				this.parent,
				this.sort,
				this.type,
				this.createdAt,
				this.updatedAt});

	Children.fromJson(Map<String, dynamic> json) {
		id = json['id'];
		name = json['name'];
		parent = json['parent'];
		sort = json['sort'];
		type = json['type'];
		createdAt = json['created_at'];
		updatedAt = json['updated_at'];
	}

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = this.id;
		data['name'] = this.name;
		data['parent'] = this.parent;
		data['sort'] = this.sort;
		data['type'] = this.type;
		data['created_at'] = this.createdAt;
		data['updated_at'] = this.updatedAt;
		return data;
	}
}